package com.ruoyi.system.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.CrmCustomerInfo;
import com.ruoyi.system.domain.from.CrmCustomerAdd;
import com.ruoyi.system.domain.from.CrmCustomerInfoQuery;
import com.ruoyi.system.domain.from.CrmCustomerUpdate;
import com.ruoyi.system.domain.from.DeleteList;
import com.ruoyi.system.domain.vo.CrmCustomerInfoDetail;
import com.ruoyi.system.domain.vo.CustomerInfoPageVo;

import javax.servlet.http.HttpServletResponse;

/**
 * 客户Service接口
 * 
 * @author yangsen
 * @date 2023-05-10
 */
public interface ICrmCustomerInfoService extends IService<CrmCustomerInfo> {
    /**
     * 查询客户
     * 
     * @paramcustomerId 客户主键
     * @return 客户
     */
    public R<CrmCustomerInfoDetail> selectCrmCustomerInfoBycustomerId(Long customerId);

    /**
     * 查询客户列表
     * 
     * @param crmCustomerInfoQuery 客户
     * @return 客户集合
     */
    public R<CustomerInfoPageVo> selectCrmCustomerInfoList(CrmCustomerInfoQuery crmCustomerInfoQuery, String customerType);


    /**
     * 客户导出
     *
     * @param
     * @return
     */
    public void exportCrmCustomerInfo(HttpServletResponse response, String customerType, CrmCustomerInfoQuery crmCustomerInfoQuery);


    /**
     * 删除客户
     * 
     * @paramcustomerIds 需要删除的客户主键集合
     * @return 结果
     */
    public AjaxResult deleteCrmCustomerInfoBycustomerIds(Long customerId);


    /**
     * 批量删除客户
     *
     * @paramcustomerIds 需要删除的客户主键集合
     * @return 结果
     */
    public AjaxResult deleteCrmCustomerInfoBycustomerIdsAll(DeleteList deleteList);



    /**
     * 新增客户
     *
     * @crmCustomerAdd
     * @return 结果
     */
    public AjaxResult addCrmCustomerInfo(CrmCustomerAdd crmCustomerAdd,String customerType);

    /**
     * 修改客户
     *
     * @crmCustomerUpdate
     * @return 结果
     */
    public AjaxResult updateCrmCustomerInfoNew(CrmCustomerUpdate crmCustomerUpdate);

    /**
     * 转换客户
     *
     * @customerId 客户ID
     * @return 结果
     */
    public AjaxResult exchangeCrmCustomerInfo(Long customerId);


    /***
     * 统计计算
     */

    public AjaxResult realTime(Long customerId);
}
